/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-11-10 16:51:31
 * @LastEditTime: 2022-11-17 17:06:15
 */
import { SET_CHART_TYPE, SET_X_DATA, SET_Y_DATA } from '../constants';

export const BasicsVisualizationReducer = (state, action) => {
  switch (action.type) {
    case SET_CHART_TYPE: {
      return { ...state, chartType: action.data };
    }
    case SET_X_DATA: {
      return { ...state, xdata: action.data };
    }
    case SET_Y_DATA: {
      return { ...state, ydata: action.data };
    }
    default:
      console.log('untouched', action);
      return state;
  }
};
